package ui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import ui.JTreeView;

public class OrientAction extends AbstractAction {

	private JTreeView tree;
	private int orientation;
    
    public OrientAction(JTreeView t,int orientation) {
    	tree = t;
        this.orientation = orientation;
    }
    public void actionPerformed(ActionEvent evt) {
        tree.setOrientation(orientation);
        tree.getVisualization().cancel("orient");
        tree.getVisualization().run("treeLayout");
        tree.getVisualization().run("orient");
    }
}


